package com.ruoyi.project.system.service;

import com.ruoyi.project.system.domain.Promotion;
import com.ruoyi.project.system.domain.SmProduct;
import com.ruoyi.project.system.domain.vo.Option;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 产品Service接口
 */
public interface ISmProductService {

    List<Option> selectOption();

    String inviteCode(Long userId, @NotBlank String info);

    Map<String, Object> index();

    BigDecimal userBasePrice(Long userId, Integer roleId, SmProduct smProduct);

    List<Promotion> promotion();

    BigDecimal promotionAdd(Long userId, SmProduct smProduct);

    BigDecimal promotionPrice(Long userId, Integer roleId, SmProduct smProduct);

    BigDecimal basePriceAdd(Long userId,SmProduct smProduct);

    BigDecimal maxLimit(Long userId, SmProduct smProduct, String type);

    /**
     * 查询产品
     *
     * @param id 产品主键
     * @return 产品
     */
    SmProduct selectSmProductById(Integer id);


    /**
     * 修改产品
     *
     * @param smProduct 产品
     * @return 结果
     */
    int updateSmProduct(SmProduct smProduct);

}
